<template>
  <div id="app">
    <nav-bar v-if="isShowNav"></nav-bar>
    <router-view />
    <Footer v-if="isShowNav"></Footer>
  </div>
</template>
<script>
import NavBar from "@c/NavBar.vue";
import Footer from "@b/Footer.vue";
export default {
  components: {
    NavBar,
    Footer,
  },
  data() {
    return {
      isShowNav: true,
      ShowMenuList: [
        "/",
        "/home",
        "/contactUs",
        "/demand",
        "/botDetail",
        "/newsList",
        "/newsDetail",
        "/hotBot",
      ],
    };
  },
  watch: {
    $route(to, from) {
      if (this.ShowMenuList.includes(to.path)) {
        this.isShowNav = true;
      } else {
        this.isShowNav = false;
      }
    },
  },
};
</script>
<style lang="less">
</style>
